/**
 * MessageHandler.java
 * ************************** 
 * @date Mar 18, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package messages;


import java.util.Queue;




/**
 * Description:
 * Each service that require a remote communication with other nodes 
 * needs to provide a MessageHandler, 
 * and register it to a NetworkManager. 
 * A class implementing the MessageHandler interface must be able
 * to dispatch and collect the Message(s) of the service selecting
 * them from the overall incoming Message(s). 
 *
 */
public interface MessageHandler {
	
	/**
	 * The list of all received Message(s) is passed as parameter.
	 * The MessageHandler has to select and collect those Message(s) 
	 * directed to the service.
	 * 
	 * @param queue : List<Message>
	 */
	public void extractIncomingMessages(Queue<Message> queue);
}
